package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;

public class UC1 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_u_c1);
    }
    public void OnClick(View v)
    {
        LinearLayout layout= (LinearLayout) findViewById(R.id.Main);
        if(v.getId()==R.id.ret1)
        {
            Intent intent=new Intent();
            ComponentName cname=new ComponentName(this,MainActivity.class);
            intent.setComponent(cname);
            startActivity(intent);
        }
        if(v.getId()==R.id.uibt1)
        {
            layout.setGravity(Gravity.CENTER);
            layout.setOrientation(LinearLayout.HORIZONTAL);
        }
        if(v.getId()==R.id.uibt2)
        {
            layout.setGravity(Gravity.CENTER);
            layout.setOrientation(LinearLayout.VERTICAL);
        }
        if(v.getId()==R.id.uibt3)
        {
            layout.setGravity(Gravity.LEFT);

            layout.setOrientation(LinearLayout.VERTICAL);
        }




    }
}